<template>
	<view style="padding: 24rpx;" class="bg page">
		<view class="header " style=" padding: 40rpx 20rpx 0;">
			<view class="" style="display: flex;align-items: center;">
				<image src="/static/result-okicon.png" style="width: 38rpx;height: 38rpx;"></image>
				<text style="color: rgb(145, 147,152);font-size: 34rpx;margin-left: 12rpx;">恭喜资质审核通过</text>
			</view>
			<view class="" style="padding-left: 14rpx;">
				<image src="/static/result-line.png" style="width: 10rpx;height: 68rpx;" />
			</view>
			<view class="" style="display: flex;align-items: center;margin-top: -5rpx;">
				<image src="/static/result-icon2.png" style="width: 38rpx;height: 38rpx;"></image>
				<text style="color: rgba(34, 34, 34, 1);font-size: 34rpx;margin-left: 12rpx;font-weight: 500;">正在匹配客户经理…</text>
			</view>
			<view class="" style="padding-left: 38rpx;">
				<text style="color: rgba(34, 34, 34, 1);font-size: 24rpx;margin-left: 12rpx;">将继续为您匹配客户经理直至成功</text>
			</view>
		</view>

		<view class="content-card">
			<view class=""
				style="font-size: 29rpx;font-weight: 500;height: 3vh;font-family: PingFangSC-Regular, PingFang SC;">
				额度预授信成功，预计可借(元)
			</view>
			<view class="num">
				30,000
			</view>
			<view class="fftgf">
				<view class="" style="display: flex;align-items: center; justify-content: space-between;">
					<view class="" style="color:rgba(153, 153, 153, 1);font-size: 31rpx;">
						服务提供方
					</view>
					<view class="" style="font-size: 30rpx">
						<text>{{ companyName || '客户经理全忙，正在寻问中'}}</text>
						<text style="color:rgba(153, 153, 153, 1);margin-left: 6rpx;">&gt</text>
					</view>
				</view>
			</view>

			<view class="" style="height: 7.2vh;">

			</view>

			<view class="xiey-card" @click="xieyiOk = !xieyiOk">
				<view class="">
					<image :src="xieyiOk ? '/static/check.png': '/static/indexbtnunsel.png'"
						style="width: 28rpx;height: 28rpx;"></image>
				</view>
				<view class="text">
					我已阅读协议，同意并授权平台在授权时间内继续为我匹配客户经理直至才匹配成功，匹配成功后依据<text style="color: #c74c47ba;font-size: 12px;" @click.stop="goLink('\\static/protocol/person_info.html')">《个人信息授权书》</text>将个人信息授权至机构
				</view>
			</view>
			<view class="submit-btn" @click="ok">
				同意，查看更多在线产品
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				xieyiOk: true,
				companyName: ''
			};
		},
		onLoad(porps) {
			const {
				companyName
			} = porps
			if (companyName) {
				this.companyName = companyName
			}
			this.city()
		},
		methods: {
			goLink(link){
				// #ifdef H5
				window.location.href = link
				// #endif
			},
			async city () {
				const res = await this.$myRequest({
					url: 'api/sys/getipinfo',
					method: 'post',
					data: {
				
					}
				});
				console.log(res.provinceCode)
				if (res.provinceCode == 110000 || res.provinceCode == 310000) {
					uni.setStorageSync('pageType', 'h5_auth')
					uni.setStorageSync('fasthome', false)
				
				} else {
					uni.setStorageSync('fasthome', true)
				}
			},
			ok() {
				if (!this.xieyiOk) {
					return uni.showToast({
						title: '请勾选相关协议',
						icon: 'error'
					})
				}
				console.log('la')
				var s = uni.getStorageSync('pageType')

				if (s == 'h5_auth_list') {
					// uni.redirectTo({
					// 	url: '../home/home'
					// })
					window.open('\\approve/#/prodList', "_top")
				} else if (s == 'h5_auth_download') {
					let platform = uni.getSystemInfoSync().platform;
					if (platform == 'ios') {
						// uni.redirectTo({
						// 	url: '../home/home'
						// })
						window.open('\\approve/#/prodList', "_top")
					} else {
						uni.redirectTo({
							url: '../download/download'
						})

					}

				} else if (s == 'h5_auth') {
					uni.redirectTo({
						url: '../testdown/testdown'
					})
				} else {
					// uni.redirectTo({
					// 	url: '../home/home'
					// })
					window.open('\\approve/#/prodList', "_top")
				}
			}
		}
	}
</script>

<style lang="scss">
	.page {
		font-family: PingFangSC-Semibold, PingFang SC;
	}

	.bg {
		background: url('/static/result-bg.png') no-repeat;
		background-size: 100% 100%;
		height: 100vh;
		box-sizing: border-box;
	}

	.header {
		height: 18vh;
		// background-color: yellow;
		box-sizing: border-box;
	}

	.content-card {
		margin-top: 3vh;
		padding: 2vh 38rpx;
	}

	.num {
		font-size: 70rpx;
		height: 7.6vh;
		display: flex;
		align-items: center;
		color: rgba(235, 61, 53, 1);
		font-weight: bold;
		font-family: PingFangSC-Semibold, PingFang SC;

	}

	.fftgf {
		margin-top: 1vh;
		height: 6vh;
	}

	.xiey-card {
		display: flex;
		align-items: flex-start;

		.text {
			font-size: 24rpx;
			word-break: break-all;
			margin-left: 10rpx;
			color: rgba(153, 153, 153, 1);
		}
	}

	.submit-btn {
		height: 40rpx;
		border-radius: 9999999rpx;
		background: #EB3D35;
		color: white;
		font-family: PingFangSC-Medium, PingFang SC;
		font-size: 36rpx;
		text-align: center;
		padding: 28rpx 30rpx;
		display: grid;
		place-content: center;
		margin-top: 40rpx;
	}
</style>